package com.mnsq.permission.controller;

import com.mnsq.permission.service.SysService;
import com.vwkit.common.bean.Result;
import com.mnsq.common.bean.annotation.UserInfoRequired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author 周俭
 */
@RestController
@RequestMapping("sys")
public class SysController {

    @Autowired
    private SysService sysService;

    @PostMapping("/user/list")
    @UserInfoRequired(required = true)
    public Result userList(String name, Integer pageNum, Integer pageSize) {
        System.out.println(name+"---"+pageNum+"---"+pageSize);
        return sysService.listUser(name, pageNum, pageSize);
    }
}
